package ophiux.api.sdk.test.repair;

import java.util.Date;
import java.util.UUID;

import ophiux.api.sdk.client.DefaultOphiuxClient_New;
import ophiux.api.sdk.client.IOphiuxClient;
import ophiux.api.sdk.request.repair.RepairApplyRequest;
import ophiux.api.sdk.response.repair.RepairApplyResponse;

public class repairApply_TEST {
	public static void main(String[] args) {
		String url = "http://192.168.6.12:8081/ophiuxDataService2/ws/service?wsdl";
		String userName = "jiuyi160";
		String userPwd = "123456";
		String token = "123456";
		IOphiuxClient client = new DefaultOphiuxClient_New(url, userName, userPwd,token);
		RepairApplyRequest req = new RepairApplyRequest();
		req.setAPPLY_TIME("2018-03-21 15:15:15");
		req.setDEPT_CDOE("29");
		req.setDEPT_NAME("儿科");
		req.setDEVICE_PLACE("重庆奥菲科");
		req.setPHONE("13896737541");
		req.setPICTURE("");
		req.setQUESTION_DESC("窗户破了");
		req.setQUESTION_TYPE("1");
		req.setUSER_CODE("");
		req.setUSER_ACC("system");
		req.setUSER_NAME("陈浪");
		req.setAPPLY_CODE(UUID.randomUUID().toString());
		
		Date date = new Date();
		Long begin = date.getTime();
		
		RepairApplyResponse resp = null;
		try {
			resp = client.executor(req);
		} catch (Exception e) {
			e.printStackTrace();
		}
		Date date2 = new Date();
		Long end = date2.getTime();
		System.out.println(end-begin);
		System.out.println(resp.toString());
	}
}
